﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="实验2-2.aspx.cs" Inherits="计科2015_31.实验2_2" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
          <div>
            <asp:Label ID="Label1" runat="server" Text="账号："></asp:Label>
            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1" ErrorMessage="账号不能为空"></asp:RequiredFieldValidator>
        </div>
        <asp:Label ID="Label2" runat="server" Text="性别："></asp:Label>
        <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
        <p>
            <asp:Label ID="Label3" runat="server" Text="密码："></asp:Label>
            <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox2" ErrorMessage="密码不能为空"></asp:RequiredFieldValidator>
        </p>
        <asp:Label ID="Label4" runat="server" Text="再次输入密码："></asp:Label>
        <asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
        <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="TextBox3" ControlToValidate="TextBox5" ErrorMessage="密码不一致"></asp:CompareValidator>
        <p>
            <asp:Label ID="Label5" runat="server" Text="年龄："></asp:Label>
            <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
            <asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="TextBox4" ErrorMessage="年龄不能小于0，在0~120之间" MaximumValue="120" MinimumValue="0" Type="Integer"></asp:RangeValidator>
        </p>
        <asp:Label ID="Label7" runat="server" Text="邮箱："></asp:Label>
        <asp:TextBox ID="TextBox6" runat="server"></asp:TextBox>
        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TextBox6" ErrorMessage="格式不对" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
        <p>
            <asp:Label ID="Label6" runat="server" Text="偶数："></asp:Label>
            <asp:TextBox ID="TextBox7" runat="server" Height="16px"></asp:TextBox>
            <asp:CustomValidator ID="CustomValidator1" runat="server" ControlToValidate="TextBox7" ErrorMessage="不是一个偶数" ClientValidationFunction="clientValidate"></asp:CustomValidator>
        </p>
        <asp:Button ID="Button1" runat="server" Text="注册" />
        <asp:Button ID="Button2" runat="server" CausesValidation="False" OnClick="Button2_Click" Text="返回登录" />
        <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True" />
        <asp:Label ID="Label8" runat="server" Text="账号："></asp:Label>
        <asp:TextBox ID="TextBox8" runat="server"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TextBox1" ErrorMessage="账号不能为空"></asp:RequiredFieldValidator>
        <div>
            <asp:Label ID="Label9" runat="server" Text="密码："></asp:Label>
            <asp:TextBox ID="TextBox9" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="TextBox2" ErrorMessage="密码不能为空"></asp:RequiredFieldValidator>
        </div>
        <asp:Button ID="Button3" runat="server" Text="登录" />
        <asp:Button ID="Button4" runat="server" CausesValidation="False" OnClick="Button2_Click" Text="注册" />

    </form>

</body>
</html>
